home *** CD-ROM | disk | FTP | other *** search
- -- background: 2757 from stack: in
- -- bmap block id: 5186
- -- flags: 4000
- -- background id: 0
- -- name: HYPER PAYROLL
-
-
- -- part 1 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=75 top=66 right=129 bottom=249
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: Name
- ----- HyperTalk script -----
- on mouseUp
- set textAlign of field "Name" to left
- end mouseUp
-
-
- -- part 2 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=338 top=98 right=128 bottom=396
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Job
-
-
- -- part 3 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=455 top=96 right=112 bottom=509
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Fed%
-
-
- -- part 4 (field)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=455 top=113 right=128 bottom=506
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: St%
-
-
- -- part 7 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=457 top=25 right=48 bottom=509
- -- title width / last selected line: 0
- -- icon id / first selected line: 1013 / 1013
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Right
- ----- HyperTalk script -----
- on mouseUp
- go to next card
- end mouseUp
-
-
-
- -- part 8 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=354 top=25 right=46 bottom=383
- -- title width / last selected line: 0
- -- icon id / first selected line: 1015 / 1015
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: ComputePay
- ----- HyperTalk script -----
- on mouseUp
-
- -- SET FORMAT
- set textAlign of field "CurrPay" to right
- set textStyle of field "CurrPay" to bold
- set textAlign of field "JOB" to left
- set textStyle of field "Name" to bold
- set cursor to 4
-
- -- SET GLOBALS
- global FICA1
- global FICA2
- global FUTA1
- global FUTA2
- global SUTA1
- global SUTA2
- global FICAtotal
-
- -- CLEAR LAST TOTALS BEFORE CALCULATING NEW PAY
- repeat with x = 1 to 11
- if x = 3 then next repeat
- if x = 7 then next repeat
- if x = 8 then next repeat
- put empty into line x of field "CurrPay"
- end repeat
-
- -- CLEAR VARIABLES
- put 0 into sum
- put 0 into sum2
- put 0 into limit
- put 0 into paid
- put 0 into paid1
- put 0 into whTax
-
- -- COMPUTE REGULAR PAY
- set numberFormat to 0.00
- if line 1 of field "Job" = " " or line 1 of field "Hours" = " " then
- put empty into line 1 of field "CurrPay"
- else
- if line 1 of field "Job" <> empty then
- put line 1 of field "Job" into pay1
- if line 1 of field "Hours" <> empty then
- put line 1 of field "Hours" into pay2
- multiply pay1 by pay2
- multiply pay1 by 100
- put round(pay1) into rd1
- divide rd1 by 100
- put rd1 into line 1 of field "CurrPay"
- add rd1 to sum
- end if
- end if
- end if
-
- -- COMPUTE OVERTIME
- if line 2 of field "Job" = " " or line 2 of field "Hours" = " " then
- put 0 into line 2 of field "CurrPay"
- else
- if line 2 of field "Job" <> empty then
- put line 1 of field "Job" into pay3
- put line 2 of field "Job" into pay4
- put line 2 of field "Hours" into pay5
- multiply pay4 by pay3
- multiply pay4 by pay5
- multiply pay4 by 100
- put round(pay4) into rd4
- divide rd4 by 100
- put rd4 into line 2 of field "CurrPay"
- add rd4 to sum
- end if
- end if
-
- -- ADD OTHER PAY
- if line 3 of field "CurrPay" <> empty then
- add line 3 of field "CurrPay" to sum
- end if
-
- -- COMPUTE FICA
- put FICA1 into FICA
- multiply FICA by sum
- multiply FICA by 100
- put round(FICA) into whtax
- divide whtax by 100
- -- see if it's over limit
- put FICAtotal into limit2
- multiply limit2 by 100
- put round(limit2) into limit
- divide limit by 100
- put line 4 of field "YTDtotal" into paid1
- put line 4 of field "YTDtotal" into paid
- if paid1 >= limit then
- put 0 into line 4 of field "CurrPay"
- else
- add whtax to paid1
- if paid1 >= limit and paid < limit then
- put limit - paid into paid3
- put paid3 into line 4 of field"CurrPay"
- add paid3 to sum2
- else
- put whtax into line 4 of field "CurrPay"
- add whtax to sum2
- end if
- end if
-
- -- COMPUTE FED WITHHOLDING TAX
- if line 1 of field "Fed%" <> empty then
- put line 1 of field "Fed%" into deduct2
- multiply deduct2 by sum
- multiply deduct2 by 100
- put round(deduct2) into drd2
- divide drd2 by 100
- put drd2 into line 5 of field "CurrPay"
- add drd2 to sum2
- end if
-
- -- COMPUTE STATE WITHHOLDING TAX
- if line 1 of field "St%" <> empty then
- put line 1 of field "St%" into deduct3
- multiply deduct3 by sum
- multiply deduct3 by 100
- put round(deduct3) into drd3
- divide drd3 by 100
- put drd3 into line 6 of field "CurrPay"
- add drd3 to sum2
- end if
-
- -- ADD MISC. WITHHOLDINGS TO TOTAL DEDUCTS
- if line 7 of field "CurrPay" <> empty then
- add value of line 7 of field "CurrPay" to sum2
- end if
- if line 8 of field "CurrPay" <> empty then
- add value of line 8 of field "CurrPay" to sum2
- end if
-
- -- RECAP TOTAL PAY
- put sum into line 9 of field "CurrPay"
- put sum2 into line 10 of field "CurrPay"
- subtract sum2 from sum
- put sum into line 11 of field "CurrPay"
-
- set cursor to 0
- end mouseUp
-
-
-
- -- part 9 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=98 top=135 right=229 bottom=142
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 65535
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Hours
- ----- HyperTalk script -----
- on openField
- set textAlign of field "hours" to right
- end openField
-
-
-
- -- part 11 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=327 top=154 right=331 bottom=413
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 65535
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: QtrTotal
-
-
- -- part 12 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=236 top=154 right=331 bottom=321
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 65535
- -- font id: 3
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: CurrPay
-
-
- -- part 13 (field)
- -- low flags: 00
- -- high flags: 4007
- -- rect: left=4 top=235 right=338 bottom=158
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: Evaluation
-
-
- -- part 14 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=420 top=154 right=332 bottom=508
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 65535
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: YTDtotal
-
-
- -- part 15 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=59 top=28 right=47 bottom=91
- -- title width / last selected line: 0
- -- icon id / first selected line: 21700 / 21700
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Home
- ----- HyperTalk script -----
- on mouseUp
- go to stack "Home"
- end mouseUp
-
-
-
-
- -- part 16 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=338 top=62 right=96 bottom=509
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
-
-
- -- part 17 (button)
- -- low flags: 00
- -- high flags: 8004
- -- rect: left=99 top=26 right=45 bottom=145
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Find
- ----- HyperTalk script -----
- on mouseUp
- doMenu "Find..."
- end mouseUp
-
-
-
- -- part 19 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=10 top=25 right=48 bottom=49
- -- title width / last selected line: 0
- -- icon id / first selected line: 1014 / 1014
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Left
- ----- HyperTalk script -----
- on mouseUp
- go to prev card
- end mouseUp
-
-